# -*- coding: cp1250 -*-
import math
import os
print "Matematika-Graf kvadratne funkcije ax_2+bc+c"
print "Created by Robert Marko"
print ""
print ""
print "Odaberite sto zelite:"
print "1-Izracunavanje nultocki"
print "2-Izracunavanje tjemena"
print "3-Maksimum i minimum"
z = input ()
if z==1:
    a = input ("Unesite a:")
    b = input ("Unesite b:")
    c = input ("Unesite c:")
    d = b*b
    e = 4*a*c
    f = d-e
    g = math.sqrt(f)
    h = -b+g
    l = 2*a
    i = h/l
    j = -b-g
    k = j/l
    print "X1=(",i,",0)"
    print "X2=(",k,",0)"
    os.system("pause")

elif z==2:
    if z==2:
        a = input ("Unesite a:")
        b = input ("Unesite b:")
        c = input ("Unesite c:")
        d = 2*a
        e = -b/d
        f = 4*a*c
        g = b*b
        h = 4*a
        i = f-g
        j = i/h
        print "T=(",e,",",j,")"
        os.system("pause")

elif z==3:
    if z==3:
        a = input ("Unesite a:")
        b = input ("Unesite b:")
        c = input ("Unesite c:")
        if a>0:
            d = 2*a
            e = -b/d
            f = e*e
            g = a*f+b*e+c
            print "Minimum funkcije je:",g
            print "U tocki X=",e
            os.system("pause")

        elif a<0:
            if a<0:
                d = 2*a
                e = -b/d
                f = e*e
                g = a*f+b*e+c
                print "Maksimum funkcije je:",g
                print "U tocki X=",e
                os.system("pause")
        
